projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fa77bd
)
fs: fat: assign rootdir sector when accessing root directory
author
Thomas RIENOESSL
<
[email protected]
>
Tue, 13 Nov 2018 13:00:59 +0000
(14:00 +0100)
committer
Tom Rini
<
[email protected]
>
Tue, 20 Nov 2018 17:35:35 +0000
(12:35 -0500)
This fixes problems accessing drives formated under
Windows as FAT16.
Signed-off-by: Thomas RIENOESSL <
[email protected]
>
[trini: Rebase on top of
f528c140c801
]
Signed-off-by: Tom Rini <
[email protected]
>
fs/fat/fat.c
patch
|
blob
|
history
diff --git
a/fs/fat/fat.c
b/fs/fat/fat.c
index b08949d3705cf979f2554525b2908ab16973aaf8..4bc3030ab88fb993a33bbd22632836ff8de8d300 100644
(file)
--- a/
fs/fat/fat.c
+++ b/
fs/fat/fat.c
@@
-725,7
+725,10
@@
static void *next_cluster(fat_itr *itr)
if (itr->last_cluster)
return NULL;
- sect = clust_to_sect(itr->fsdata, itr->next_clust);
+ if (itr->fsdata->fatsize != 32 && itr->is_root)
+ sect = mydata->rootdir_sect;
+ else
+ sect = clust_to_sect(itr->fsdata, itr->next_clust);
debug("FAT read(sect=%d), clust_size=%d, DIRENTSPERBLOCK=%zd\n",
sect, itr->fsdata->clust_size, DIRENTSPERBLOCK);